Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overread warnings #156

Merged

Conversation

tim-griesbach
Copy link
Collaborator

@tim-griesbach tim-griesbach commented Sep 29, 2022

Fix overread warnings

Proposed changes:

  • For function parameters to read strings we use char abc* instead of char abc[NUM] to avoid compiler warnings classified as string overread in case of strings that are shorter than NUM - 1. These warnings appear because GCC 11.2 differentiates between TYPE* abc and TYPE abc[]
    (cf. mpi: use pointers for array_of_statuses pmodels/mpich#5749).
  • For function parameters to write strings we do the same changes for consistency.

GCC 11.2 differentiates between TYPE* abc and TYPE abc[]
(cf. pmodels/mpich#5749). Therefore, we use
the explicit pointer declaration to silence string overread warnings
for GCC 11.2.
@tim-griesbach tim-griesbach changed the title Fix overread warning Fix overread warnings Sep 29, 2022
@cburstedde cburstedde merged commit 8731cbd into cburstedde:prev3-develop Sep 30, 2022
@tim-griesbach tim-griesbach deleted the fix-warning-stroverread branch September 30, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants